<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
<%@ page language="java" import="java.util.*" %>

<%   
String path = request.getContextPath();   
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";   
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<jsp:include page="../inc/bootstrap.jsp"></jsp:include>
</head>
<body class="minbody">
	<form role="form" action="<%=basePath %>commentController/doctorCommentList.do" method="post" name="userForm" id="userForm" class="form-horizontal">
			<div class="mainLay">
			<div class="maintop clearfix">
			<div class="pull-left">
				<div class="pull-left maintit"><span>会员信息列表</span></div>
				<div class="pull-left">
					<div id="searchBox" class="searchBox">
						<div class="searchInput"><input type="text" class="searchVal form-control" name="searchValue" value="${pd.searchValue}" placeholder="医师信息查询"></div>
						<!-- 大于480的查询框 -->
						<div class="searchLarge">
							<div class="searchBtn btn btn-default" onclick="queryForm()">查询</div>
							<div class="searchRst btn btn-default">重置</div>
							<div class="searchMore btn btn-default"><i class="glyphicon glyphicon-plus mr3"></i>更多</div>
						</div>
					</div>
				</div>
			</div>
			<div class="pull-right maintopmenu">
				<button type="button" class="btn btn-default winRefresh" onclick="winRefresh();">刷新</button>
			</div>
			<div class="clearfix"></div>
			<!-- 更多搜索条件 -->
			<div class="searchDialog" style="display: none;">
				<!-- select用户状态 -->
				<div class="searchItem">
					<div class="searchLabel">评分状态：</div>
					<div class="searchForms">
					    <input id="status" name="status" type="hidden" value="${physician.name}">
						<select class="form-control" name="score_status" id="score_status">
							<option value="">请选择状态</option>
							<option value="1" <c:if test="${pd.score_status =='1'}">selected</c:if>>小于等于3</option>
							<option value="2" <c:if test="${pd.score_status =='2'}">selected</c:if>>大于3且小于等于4</option>
							<option value="3" <c:if test="${pd.score_status =='3'}">selected</c:if>>大于4且小于等于5</option>
						</select>
					</div>	
				</div>
				<!-- select用户状态 end-->
			</div>
		</div>
			<div class="orderBox clearfix">
				<div class="minw1600">
					<table id="table" data-initable="yes" class="table table-bordered table-hover table-striped table-condensed">
						<thead>
						<tr>
							<th class="w30"><input type="checkbox"/></th>
							<th class="wd4">姓名</th>
							<th class="wd4">昵称</th>
							<th class="wd4">电话号码</th>
							<th class="wd4">性别</th>
							<th class="wd4">年龄</th>
							<th class="wd2">邮箱</th>
							<th class="wd2">地址</th>
							<th class="text-nowrap">操作</th>
						</tr>	
					</thead>
					<tbody>
						<!-- 开始循环 -->	
						<c:choose>
							<c:when test="${not empty physicianList}">
								<c:forEach items="${physicianList}" var="physician" varStatus="vs">
								<tr>
									<td><input type="checkbox" name="id" id="id" value="${physician.id}" /></td>
									<td>${physician.name}</td>
									<td>${physician.post}</td>
									<td>${physician.subject}</td>
									<td>${physician.hospital}</td>								
									<td>${physician.tel}</td>									
									<td>${physician.profession}</td>									
									<td>${physician.advisorycount}</td>								
									<td class="text-nowrap">
										<div class="opbuttons">
											<ul>
												<!-- 查看 -->
												<shiro:hasPermission name="memberlist:view">
													<li>
														 <a href="javascript:void(0);" onclick="view('${physician.id}');">预览</a>
													</li>
												</shiro:hasPermission>
												
											</ul>
										</div>
									</td>
								</tr>
								</c:forEach>
							</c:when>
							<c:otherwise>
								<tr class="main_info">
									<td colspan="30" class="text-center">没有相关数据</td>
								</tr>
							</c:otherwise>
						</c:choose>
						
					</tbody>
				</table>
				</div>
			</div>
			<!-- 分页栏 -->
			<div id="foot_page" class="clearfix">
				${page.pageStr}
			</div>
		</div>
		</form>
  </body>
<script type="text/javascript">
var table = "";	
	//高级查询展开折叠时，界面的重置回调函数，覆盖advancedQuery.jsp中的resizeLayOut()方法；
function resizeLayOut(){
	//初始化orderBox的高度
	initOrderBoxHeight();
	//表格自适应
	initTableHeight(table,$("#table"));
};
$(function (){
	//初始化orderBox的高度
	initOrderBoxHeight();
	//创建表格自适应对象
	table = new MaxTable($("#table"));
	//表格自适应
	initTableHeight(table,$("#table"));
		//作废行的操作
		nullify($("#table"));
});
//查询窗口
function queryForm(){
	$("#userForm").submit();
}
//查看
function view(doctor_id){
 	//模态窗口
 	sessionStorage.setItem('doctor_id',doctor_id);
	top.diag = $.MaxDialog({
		"id":"editUser_edit",
		"width":1210,
		"height":'80%',
		"title":"预览医师评论列表",
		"type":"iframe",
		"isFooter":false,
		"url":"<%=basePath%>commentController/doctorCommentDetail.do?doctor_id="+doctor_id,
		"hideBefore":function(obj){
			self.location.reload();
		}
	})
}

</script>
</html>